#!/bin/sh
#
# Copyright (C) 2015 OpenWrt.org
#

. /lib/functions/uci-defaults.sh

board_config_update

board=$(board_name)
boardname="${board##*,}"

case "$board" in
asus,rt-ac58u)
	ucidef_set_led_wlan "wlan2g" "WLAN2G" "${boardname}:blue:wlan2G" "phy0tpt"
	ucidef_set_led_wlan "wlan5g" "WLAN5G" "${boardname}:blue:wlan5G" "phy1tpt"
	ucidef_set_led_usbport "usb" "USB" "${boardname}:blue:usb" "usb1-port1" "usb2-port1" "usb3-port1" "usb4-port1"
	ucidef_set_led_netdev "wan" "WAN" "${boardname}:blue:wan" "eth1"
	ucidef_set_led_switch "lan" "LAN" "${boardname}:blue:lan" "switch0" "0x1e"
	;;
avm,fritzbox-4040)
	ucidef_set_led_wlan "wlan" "WLAN" "fritz4040:green:wlan" "phy0tpt" "phy1tpt"
	ucidef_set_led_netdev "wan" "WAN" "fritz4040:green:wan" "eth1"
	ucidef_set_led_switch "lan" "LAN" "fritz4040:green:lan" "switch0" "0x1e"
	;;
glinet,gl-b1300)
	ucidef_set_led_wlan "wlan" "WLAN" "${boardname}:green:wlan" "phy0tpt"
	;;
netgear,ex6100v2 |\
netgear,ex6150v2)
	ucidef_set_led_wlan "wlan2g" "WLAN2G" "ex61x0v2:green:router" "phy0tpt"
	ucidef_set_led_wlan "wlan5g" "WLAN5G" "ex61x0v2:green:client" "phy1tpt"
	;;
meraki,mr33)
	ucidef_set_interface_lan "eth0"
	;;
zyxel,wre6606)
	ucidef_set_led_wlan "wlan2g" "WLAN2G" "${boardname}:green:wlan2g" "phy0tpt"
	ucidef_set_led_wlan "wlan5g" "WLAN5G" "${boardname}:green:wlan5g" "phy1tpt"
	;;
*)
	;;
esac

board_config_flush

exit 0
